def f2c(f):
    return (f-32)/1.8


def c2f(c):
    return c*1.8+32+32


tstr = input("请输入带有符号的温度值:")
if(tstr[-1] in ["f", "F"]):
    f = float(tstr[0:-1])
    c = f2c(f)
    print("华氏 {:.2f}f =>摄氏 {:.2f}c".format(f, c))
elif tstr[-1] in ["c", "C"]:
    c = float(tstr[0:-1])
    f = c2f(c)
    print("摄氏 {:.2f}c => 华氏{:.2f}f".format(c, f))
else:
    print("无法识别")
